package com.hp.teach.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hp.teach.mapper.TeachWeishengMapper;
import com.hp.teach.domain.TeachWeisheng;
import com.hp.teach.service.ITeachWeishengService;
import com.hp.common.support.Convert;

/**
 * 卫生 服务层实现
 * 
 * @author hp
 * @date 2021-07-30
 */
@Service
public class TeachWeishengServiceImpl implements ITeachWeishengService 
{
	@Autowired
	private TeachWeishengMapper teachWeishengMapper;

	/**
     * 查询卫生信息
     * 
     * @param wid 卫生ID
     * @return 卫生信息
     */
    @Override
	public TeachWeisheng selectTeachWeishengById(Integer wid)
	{
	    return teachWeishengMapper.selectTeachWeishengById(wid);
	}
	
	/**
     * 查询卫生列表
     * 
     * @param teachWeisheng 卫生信息
     * @return 卫生集合
     */
	@Override
	public List<TeachWeisheng> selectTeachWeishengList(TeachWeisheng teachWeisheng)
	{
	    return teachWeishengMapper.selectTeachWeishengList(teachWeisheng);
	}
	
    /**
     * 新增卫生
     * 
     * @param teachWeisheng 卫生信息
     * @return 结果
     */
	@Override
	public int insertTeachWeisheng(TeachWeisheng teachWeisheng)
	{
	    return teachWeishengMapper.insertTeachWeisheng(teachWeisheng);
	}
	
	/**
     * 修改卫生
     * 
     * @param teachWeisheng 卫生信息
     * @return 结果
     */
	@Override
	public int updateTeachWeisheng(TeachWeisheng teachWeisheng)
	{
	    return teachWeishengMapper.updateTeachWeisheng(teachWeisheng);
	}

	/**
     * 删除卫生对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTeachWeishengByIds(String ids)
	{
		return teachWeishengMapper.deleteTeachWeishengByIds(Convert.toStrArray(ids));
	}
	
}
